#!/bin/bash
note=0
total=0

for f in bon??.xml ; 
  do 
  total=$(($total+1))
  echo $f			# 
  ./valxml $f
  if [ $? -eq 0 ];
      then
      note=$(($note+1))
  fi
done

for f in mal??.xml ; 
  do 
  total=$(($total+1))
  echo $f			# 
  ./valxml $f
  if [ $? -gt 0 ];
      then
      note=$(($note+1))
  fi
done

echo "Votre note est de : " $note "/" $total
echo "Soit " $(($note*20/$total)) "/20"
